using System;
using System.Runtime.Serialization;

namespace PH.Model.Schools
{
    [DataContract]
    public class ClassModel:MBase
    {
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public int ID { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public System.Guid Guid { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public int SchoolID { get; set; }
        [DataMember]
        [Model]
        public int GradeCode { get; set; }
        [DataMember]
        [Model]
        public string ClassName { get; set; }
        
        [DataMember]
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        public System.DateTime CreatedOn { get; set; }
        [DataMember]
        [Model]
        public string Advisor { get; set; }
        [DataMember]
        [Model]
        public int CIndex { get; set; }
        [DataMember]
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        public bool Chinese { get; set; }

        #region Help
        public Guid SchoolGuid { get; set; }
        [DataMember]
        public string GradeName { get; set; }
        [DataMember]
        public int PersonCount { get; set; }

        public string OperationResult { get; set; }
        #endregion
    }

    [DataContract]
    public class ClassCollection : ModelCollectionBase<ClassModel> { }

    public class ClassQuery : QueryBase
    {
        public int SchoolID { get; set; }
        public Guid SchoolGuid { get; set; }
        public int GradeCode { get; set; }

        public bool GetPersonCount { get; set; }
        public bool GetGradeName { get; set; }
    }
}
